package com.jr.Service.Impl;

import com.jr.Dao.IAdminsDao;
import com.jr.Dao.Impl.AdminsDaoImpl;
import com.jr.Pojo.Packages;
import com.jr.Pojo.Users;
import com.jr.Service.IAdminService;
import com.jr.util.PageHelper;

import java.util.ArrayList;

public class AdminServiceImpl implements IAdminService {
    IAdminsDao iad = new AdminsDaoImpl();

    @Override
    public int queryDataCount() {
        return iad.selectDataCount();
    }

    @Override
    public ArrayList<Users> selectAllUsers(PageHelper ph) {
        return iad.selectAllUsers(ph);
    }

    @Override
    public boolean delUsers(String username) {
        return iad.delUsers(username)>0;
    }

    @Override
    public boolean updateUsers(Users users) {
        return iad.updateUsers(users)>0;
    }

    @Override
    public int queryAllDataCount(String id) {
        return iad.selectAllDataCount(id);
    }

    @Override
    public ArrayList<Packages> queryAllPackages(String id,PageHelper ph) {
        return iad.selectAllPackages(id, ph);
    }
}
